<?php
    $pole = array("1","Karel","A","Pepa","10","B","5","Josef","T","I","4","11");
    $intcount=0;
    $count=0;
    $letterscount=0;
    $wordscount=0;
    $max=0;
    $maxint=0;
    $min=100;
    $polecisel=$pole;
    $pomocna=0;
    
foreach($pole as $p){
echo $p."<br>";
}

echo "<br>" ;

echo "toto jsou cislicka:"."<br>"  ;
foreach($pole as $p) {
$count++;
if(is_numeric($p)==true)
{

  $intcount++;
   if($p <5)     {
 echo "<div style='background-color:pink;width : 12px;'> ".$p."</div>";     
}
else {
echo $p."<br>";}
 if($p<$min) {
   $min=$p;
 }
 if($p>$max){
 $max=$p;
 }
}
}

echo "<br>" ;

echo "toto jsou slovicka: "."<br>" ;
foreach($pole as $p)
{
  if(is_string($p)&&strlen($p)>1 && !is_numeric($p) )   {
 echo $p."<br>"; 
 $wordscount++;
 }
 }

echo "<br>" ;
 
 echo "toto jsou pismenka";
 foreach($pole as $p)
{
if(is_string($p)&&strlen($p)==1 && !is_numeric($p)) {
 echo "<div  style='background-color:red; width : 12px;'> ".$p."</div>";  
 $letterscount++;
 }
 }
 
 echo "<br>" ;
   
   foreach($polecisel as $p){
    if(is_numeric($p)==false)
    {
    $polecisel[$pomocna]=null;
     
    }
     $pomocna++;
}
  
 $polecisel2 = array_filter($polecisel);  
 echo "<br>"  ;
  foreach($polecisel2 as $p){
echo $p."<br>";
}
echo "<br>"  ;

asort($polecisel2) ;
 echo "<table border=1>";

     
  foreach($polecisel2 as $p){
  if($p>5){
      echo "<tr><tdstyle='background-color:pink;>". $p."</td></tr>";
  }
echo "<td><td>".$p."</td></tr>";
}

  
  
 echo "max je: ".$max."<br>";
  echo "min je: ".$min."<br>";
   echo "pocet pismen".$letterscount."<br>";
    echo "pocet slov".$wordscount."<br>";
     echo "pocet cisel".$intcount."<br>";
      echo "pocet".$count."<br>";
      
    
?>